Clean up PIT-thru-ioapic setup. We don't need the legacy missed-tick
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 3 Mar 2006 13:10:35 +0000 (14:10 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 3 Mar 2006 13:10:35 +0000 (14:10 +0100)
logic and so do not need to keep the PIT enabled thru the 8259 PIC.

Todo: arguable we should sync with x86/64 platform files, assuming they
do not throw out 'recent legacy' stuff (e.g., 32-bit only platforms
like P6). Getting rid of all the 82489DX and 486-era SMP stuff would be
great.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/io_apic.c
xen/arch/x86/time.c
xen/include/asm-x86/time.h

index 46e5c0c9f8b55d41b1f19f1a51dbc54493644b9d..aef5d64b5a790a7fe3dcac917f0e2cf5942860fc 100644 (file)
@@ -1548,8 +1548,9 @@ static inline void check_timer(void)
      */
     apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT);
     init_8259A(1);
-    timer_ack = 1;
-    enable_8259A_irq(0);
+    /* XEN: Ripped out the legacy missed-tick logic, so below is not needed. */
+    /*timer_ack = 1;*/
+    /*enable_8259A_irq(0);*/
 
     pin1  = find_isa_irq_pin(0, mp_INT);
     apic1 = find_isa_irq_apic(0, mp_INT);
@@ -1617,7 +1618,7 @@ static inline void check_timer(void)
 
     printk(KERN_INFO "...trying to set up timer as ExtINT IRQ...");
 
-    timer_ack = 0;
+    /*timer_ack = 0;*/
     init_8259A(0);
     make_8259A_irq(0);
     apic_write_around(APIC_LVT0, APIC_DM_EXTINT);
index 1bd15c6702fe6c8f67aebc1a215b75c5924b0c6d..59fa0bfe04a8412073b9197e8c824bce76d88d10 100644 (file)
@@ -41,7 +41,6 @@ boolean_param("hpet_force", opt_hpet_force);
 unsigned long cpu_khz;  /* CPU clock frequency in kHz. */
 unsigned long hpet_address;
 spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
-int timer_ack = 0;
 unsigned long volatile jiffies;
 static u32 wc_sec, wc_nsec; /* UTC time at last 'time update'. */
 static spinlock_t wc_lock = SPIN_LOCK_UNLOCKED;
@@ -148,16 +147,6 @@ void timer_interrupt(int irq, void *dev_id, struct cpu_user_regs *regs)
 {
     ASSERT(local_irq_is_enabled());
 
-    if ( timer_ack ) 
-    {
-        extern spinlock_t i8259A_lock;
-        spin_lock_irq(&i8259A_lock);
-        outb(0x0c, 0x20);
-        /* Ack the IRQ; AEOI will end it automatically. */
-        inb(0x20);
-        spin_unlock_irq(&i8259A_lock);
-    }
-    
     /* Update jiffies counter. */
     (*(unsigned long *)&jiffies)++;
 
index b192f55c821ab17da1891ab1920124375211a401..38e4dffcf2a45ad41c81a00178cbc62a6447f943 100644 (file)
@@ -4,8 +4,6 @@
 
 #include <asm/msr.h>
 
-extern int timer_ack;
-
 extern void calibrate_tsc_bp(void);
 extern void calibrate_tsc_ap(void);